<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8">
    <title></title>
    <script src="static/jquery/jquery-3.1.0.min.js"></script>
</head>
<body>
<h1>标题1</h1>
<h2>标题2</h2>
<p>这是一个段落</p>
<p>第二个段落</p>
<div>重要文本</div>
<br>
<button>添加CSS类</button>
</body>
<style type="text/css">
    .important{
        font-weight: bold;
        font-size: xx-large;
    }
    .blue{
        color: blue;
    }
</style>
<script>
    $(document).ready(function () {
        $("button").click(function () {
            $("h1,h2,p").addClass("blue");
            $("div").addClass("important");
        });//end click
    });//end ready
</script>
</html>